﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using VisionCloud.Core.Model.Ms;
using VisionCloud.Domain.DtoModel.Applet.RequestDto;
using VisionCloud.Domain.DtoModel.Ms;
using static VisionCloud.Core.Model.Ms.TaskPoints;

namespace VisionCloud.Domain.Repository.Interface.Ms
{
    public interface IMsTaskPointsRepository : IBaseRepository<TaskPoints>
    {
        /// <summary>
        /// 根据任务Id和站点序号取站点对象
        /// </summary>
        /// <param name="taskId">任务Id</param>
        /// <param name="pointIndex">站点序号</param>
        /// <returns></returns>
        Task<TaskPoints> GetTaskPointsAsync(Guid taskId, int pointIndex);

        /// <summary>
        /// 获取任务的站点列表
        /// </summary>
        /// <param name="taskId"></param>
        /// <returns></returns>
        Task<List<TaskPoints>> GetTaskPoints(Guid taskId);

        /// <summary>
        /// 获取已完成的站点列表
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        List<MsTaskPointIndexDto> GetFinishPoints(List<Guid> ids);

        /// <summary>
        /// 获取已完成站点编号
        /// </summary>
        /// <param name="condition"></param>
        /// <returns></returns>
        Task<List<int>> GetFinishedPointIndex(QueryReportConditionDto condition);

        /// <summary>
        /// 更改子站点状态
        /// </summary>
        /// <param name="taskId"></param>
        /// <param name="pointIndexs"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        ValueTask<bool> UpdatePointStatus(Guid taskId, int[] pointIndexs, PointStatus status);

        /// <summary>
        /// 获取子站点测量结果
        /// </summary>
        /// <param name="taskId"></param>
        /// <returns></returns>
        ValueTask<List<PointMeasureResultInfo>> GetPointMeasureResult(Guid projectId, Guid taskId);
        Task<string> GetPointTypeByTaskId(Guid taskId, int pointIndex);
    }
}